package com.springboot.filter;

import org.springframework.context.annotation.Configuration;
import org.springframework.web.servlet.config.annotation.InterceptorRegistry;
import org.springframework.web.servlet.config.annotation.WebMvcConfigurerAdapter;

@Configuration
public class WebAppConfig extends WebMvcConfigurerAdapter {
    /**
     * 重写父类WebMvcConfigurerAdapter中的addInterceptors方法可以实现拦截器配置
     * addPathPatterns添加拦截器规则
     * excludePathPatterns 用户访问拦截排除
     * **/
    @Override
    public void addInterceptors(InterceptorRegistry registry){
//        registry.addInterceptor(new Filter()).addPathPatterns("/**").excludePathPatterns("/");
    }
}